package cn.edu.scau.cmi.linzhiyang.userInterface;

import cn.edu.scau.cmi.linzhiyang.simpleFactoryMethod.PolicyProducer;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.image.ImageView;
import javafx.scene.control.ChoiceBox;
import javafx.scene.control.Label;

public class SimpleFactoryMethodController {
	@FXML
	private Label lab_4;
	@FXML
	private ChoiceBox choicebox_1;
	@FXML
	private Button btn_1;

	@FXML
	public void initialize() {
		ObservableList<String> list = FXCollections.observableArrayList("驾驶员身体受伤", "汽车损坏", "人员伤亡", "多种事故");
		choicebox_1.setItems(list);
	}

	public void evenButton() {
		String string = (String) choicebox_1.getValue();
		String str = PolicyProducer.getPolicyObj(string).getInsurInfo();
		lab_4.setText(str);
	}

}
